package com.lzh.chatnote.chat.dao;

import com.lzh.chatnote.chat.domain.entity.RoomFriend;
import com.lzh.chatnote.chat.mapper.RoomFriendMapper;
import com.lzh.chatnote.chat.service.RoomFriendService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 单聊房间表 服务实现类
 * </p>
 *
 * @author lzh
 * @since 2025-09-25
 */
@Service
public class RoomFriendDao extends ServiceImpl<RoomFriendMapper, RoomFriend> implements RoomFriendService {

    public RoomFriend queryRoomFriendByRoomId(Long roomId) {
        return lambdaQuery().eq(RoomFriend::getRoomId, roomId).one();
    }

    public List<RoomFriend> queryRoomFriendByRoomIds(List<Long> roomIds) {
        return lambdaQuery().in(RoomFriend::getRoomId, roomIds).list();
    }
}
